package ITSBank;


/**
 * This class represents a packet of shares of one type.
 * @author Benedikt Gschossmann
 */
public class SharePacket {
    private String shareName;
    private int amountOfShares;
    private float valueOfOneShare;

    /**
     * get-method for the amountOfShares
     * @return amount of shares in this packet
     */
    public int getamountOfShares () {
        return amountOfShares;
    }

    /**
     * get-method for the shareName
     * @return name of share-type in this packet
     */
    public String getshareName () {
        return shareName;
    }

    /**
     * get-method for the valueOfOneShare
     * @return value of one share in this packet
     */
    public float getvalueOfOneShare () {
        return valueOfOneShare;
    }

    /**
     * This method adds shares of the same type to the packet
     * @param number of shares to add
     */
    public void addShare(int newShares){
        amountOfShares += newShares;
    }
}

